// 封装本地存储的操作

const TOKEN_NAME = 'hm-news-token'

export function setStorageToken(payload) {
  localStorage.setItem(TOKEN_NAME, JSON.stringify(payload))
}

export function getStorageToken() {
  return JSON.parse(localStorage.getItem(TOKEN_NAME)) || {}
}

export function removeStorageToken() {
  localStorage.removeItem(TOKEN_NAME)
}
